{
  "properties" : { },
  "id" : "6fbccf7f6671411ba566d19057672ad2",
  "script" : null,
  "groupId" : "349cc5d718464a5589e14a193216b23d",
  "name" : "修改故障知识库",
  "createTime" : 1727070974392,
  "updateTime" : 1725848037558,
  "lock" : "1",
  "createBy" : "ndmp",
  "updateBy" : "ndmp",
  "path" : "update",
  "method" : "POST",
  "parameters" : [ ],
  "options" : [ ],
  "requestBody" : "{\r\n    \"title\": \"链路断开\",\r\n    \"sort\": 1,\r\n    \"context\": \"%3Cp%3E1.%26nbsp%3B%E7%89%A9%E7%90%86%E8%BF%9E%E6%8E%A5%E9%97%AE%E9%A2%98%EF%BC%9A%E5%8C%85%E6%8B%AC%E7%BD%91%E7%BA%BF%E6%8D%9F%E5%9D%8F%E3%80%81%E6%8F%92%E5%A4%B4%E6%9D%BE%E5%8A%A8%E3%80%81%E6%8E%A5%E5%8F%A3%E6%95%85%E9%9A%9C%E7%AD%89%E3%80%82%0A2.%26nbsp%3B%E7%94%B5%E6%BA%90%E6%95%85%E9%9A%9C%EF%BC%9A%E4%BA%A4%E6%8D%A2%E6%9C%BA%E6%88%96%E8%B7%AF%E7%94%B1%E5%99%A8%E4%BE%9B%E7%94%B5%E5%87%BA%E7%8E%B0%E9%97%AE%E9%A2%98%E3%80%82%0A3.%26nbsp%3B%E7%BD%91%E7%BB%9C%E6%8B%A5%E5%A1%9E%EF%BC%9A%E5%A4%A7%E9%87%8F%E7%9A%84%E6%95%B0%E6%8D%AE%E6%B5%81%E9%87%8F%E5%AF%BC%E8%87%B4%E9%93%BE%E8%B7%AF%E8%BF%87%E8%BD%BD%E3%80%82%0A4.%26nbsp%3B%E9%85%8D%E7%BD%AE%E9%94%99%E8%AF%AF%EF%BC%9A%E5%A6%82%20IP%20%E5%9C%B0%E5%9D%80%E3%80%81%E5%AD%90%E7%BD%91%E6%8E%A9%E7%A0%81%E3%80%81%E7%BD%91%E5%85%B3%E7%AD%89%E8%AE%BE%E7%BD%AE%E4%B8%8D%E6%AD%A3%E7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B2%E9%98%B2%E7%81%AB%E5%A2%99%E3%80%81%E5%85%A5%E4%BE%B5%E6%A3%80%E6%B5%8B%E7%B3%BB%E7%BB%9F%E7%AD%89%E5%AE%89%E5%85%A8%E8%AE%BE%E5%A4%87%EF%BC%8C%E4%BB%A5%E6%8A%B5%E5%BE%A1%E7%BD%91%E7%BB%9C%E6%94%BB%E5%87%BB%E3%80%82%3C%2Fp%3E\",\r\n    \"id\": \"2\",\r\n    \"alarmLevel\": \"提示\",\r\n    \"knowledgeTypeId\": \"1\"\r\n}",
  "headers" : [ ],
  "paths" : [ ],
  "responseBody" : "{\n    \"status\": 500,\n    \"message\": \"false\",\n    \"data\": {},\n    \"msg\": \"操作失败\"\n}",
  "description" : null,
  "requestBodyDefinition" : {
    "name" : "",
    "value" : "",
    "description" : "",
    "required" : false,
    "dataType" : "Object",
    "type" : null,
    "defaultValue" : null,
    "validateType" : "",
    "error" : "",
    "expression" : "",
    "children" : [ {
      "name" : "title",
      "value" : "测试",
      "description" : "",
      "required" : false,
      "dataType" : "String",
      "type" : null,
      "defaultValue" : null,
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    }, {
      "name" : "sort",
      "value" : "1",
      "description" : "",
      "required" : false,
      "dataType" : "Integer",
      "type" : null,
      "defaultValue" : null,
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    }, {
      "name" : "context",
      "value" : "%3Cp%3E%253Cp%253E%25E5%2599%25A8%253C%252Fp%253E111%3C%2Fp%3E",
      "description" : "",
      "required" : false,
      "dataType" : "String",
      "type" : null,
      "defaultValue" : null,
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    }, {
      "name" : "solve",
      "value" : "%3Cp%3E%253Cp%253E%25E5%25A4%2596%25E7%25BD%2591%253C%252Fp%253E%3C%2Fp%3E",
      "description" : "",
      "required" : false,
      "dataType" : "String",
      "type" : null,
      "defaultValue" : null,
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    }, {
      "name" : "id",
      "value" : "15",
      "description" : "",
      "required" : false,
      "dataType" : "String",
      "type" : null,
      "defaultValue" : null,
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    }, {
      "name" : "alarmLevel",
      "value" : "一般",
      "description" : "",
      "required" : false,
      "dataType" : "String",
      "type" : null,
      "defaultValue" : null,
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    }, {
      "name" : "knowledgeTypeId",
      "value" : "26",
      "description" : "",
      "required" : false,
      "dataType" : "String",
      "type" : null,
      "defaultValue" : null,
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    } ]
  },
  "responseBodyDefinition" : {
    "name" : "",
    "value" : "",
    "description" : "",
    "required" : false,
    "dataType" : "Object",
    "type" : null,
    "defaultValue" : null,
    "validateType" : "",
    "error" : "",
    "expression" : "",
    "children" : [ {
      "name" : "status",
      "value" : "200",
      "description" : "",
      "required" : false,
      "dataType" : "Integer",
      "type" : null,
      "defaultValue" : null,
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    }, {
      "name" : "message",
      "value" : "true",
      "description" : "",
      "required" : false,
      "dataType" : "String",
      "type" : null,
      "defaultValue" : null,
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    }, {
      "name" : "data",
      "value" : "",
      "description" : "",
      "required" : false,
      "dataType" : "Object",
      "type" : null,
      "defaultValue" : null,
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    }, {
      "name" : "msg",
      "value" : "操作成功",
      "description" : "",
      "required" : false,
      "dataType" : "String",
      "type" : null,
      "defaultValue" : null,
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    } ]
  }
}
================================
import  java.net.URLDecoder;
import response;

if(body==null){
    return response.json({
    "status": 200,
    "message": "false",
    "data": {},
    "msg":"更新失败"
});
}
var result=0;
try {
            String context = URLDecoder.decode(body.context, "utf-8");
            String solve = URLDecoder.decode(body.solve,"utf-8");
            body.context=context;
            body.solve=solve;
            result= db.table('ndmp_knowledge_data').primary('id').update(body,false);
        } catch (Exception) {
            return  response.json({
            "status": 500,
            "message": "false",
            "data": {},
            "msg":"操作失败"
         });  
        }
 return  response.json({
    "status": 200,
    "message": "true",
    "data": {},
    "msg":"操作成功"
});